/*
 *2020年11月5日
 *@author:huhu
 */
public class Consumer implements Runnable{
    private Staging_Area storage;
    int sum = 0;
    int id;

    public Consumer(){
    }

    public Consumer(Staging_Area storage,int id){
        this.storage = storage;
        this.id = id;
    }

    public void run(){
        try {
            Thread.sleep(Test.consumeSpeed);
        } catch (Exception e) {
            e.printStackTrace();
        }
        storage.consume(id,sum);
    }
}
